<?php
spl_autoload_register('autoload', true, true);

function autoload($class)
{
    $file = str_replace('\\', '/', $class);
    $file = "{$file}.php";

    if (file_exists($file)) {
        include_once $file;
    } else {
        echo "{$class} not fond";
    }
}
